import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine() ;
        StringBuilder strbu = new StringBuilder(str);
        for(int i = str.length()-2 ; i >= 0 ; i --){
            char tmp = str.charAt(i);
            strbu.append(tmp);
        }
        long num = Long.parseLong(strbu.toString());
        if(check(num)){
            System.out.println("prime");
        }else{
            System.out.println("noprime");
        }

    }
    private static boolean check(long num){
        if(num <= 1){
            return false ;
        }
        long len = (long)Math.sqrt(num) +1 ;
        for(long i = 2 ; i < len ; i ++){
            if(num % i == 0){
                return false ;
            }
        }
        return true ;
    }
}
